package cn.com.dcsgo.validation.menu;

/**
 * 菜单类型
 *
 * @author Dcsgo
 * @since 2025/10/12 13:45
 */

public interface MenuType {
    String directory = "topMenu";
    String menu = "secondaryMenu";
    String button = "button";

    /**
     * 获取菜单类型
     * 0 -> directory -> topMenu;
     * 1 -> menu -> secondaryMenu;
     * 2 -> button -> button;
     *
     * @param value 菜单类型值
     * @return 菜单类型
     */
    static String getMenuType(int value) {
        return switch (value) {
            case 0 -> directory;
            case 1 -> menu;
            case 2 -> button;
            default -> throw new IllegalArgumentException("不存在该菜单类型");
        };
    }
}
